:host {
  position: relative;
  display: inline-block;
}

:host([kind="neutral"]) bl-popover {
  --bl-popover-border-color: var(--bl-color-neutral-darker);
}

:host([kind="success"]) bl-popover {
  --bl-popover-border-color: var(--bl-color-success);
}

:host([kind="danger"]) bl-popover {
  --bl-popover-border-color: var(--bl-color-danger);
}

.split-button-container {
  display: flex;
}

.split-main-button {
  width: 100%;

  --bl-border-radius-m: calc(var(--bl-size-xs) / 2) 0 0 calc(var(--bl-size-xs) / 2);
}

:host([dir="rtl"]) .split-main-button {
  --bl-border-radius-m: 0 calc(var(--bl-size-xs) / 2) calc(var(--bl-size-xs) / 2) 0;
}

.split-main-button:focus {
  --bl-border-radius-l: calc(var(--bl-size-m) / 2) 0 0 calc(var(--bl-size-m) / 2);
}

.dropdown-button {
  --bl-border-radius-m: 0 calc(var(--bl-size-xs) / 2) calc(var(--bl-size-xs) / 2) 0;
}

:host([dir="rtl"]) .dropdown-button {
  --bl-border-radius-m: calc(var(--bl-size-xs) / 2) 0 0 calc(var(--bl-size-xs) / 2);
}

.dropdown-button:focus {
  --bl-border-radius-l: 0 calc(var(--bl-size-m) / 2) calc(var(--bl-size-m) / 2) 0;
}

:host([variant="secondary"][dir="rtl"]) .dropdown-button {
  inset-inline-end: -1px;
}

:host([variant="secondary"]) .dropdown-button {
  inset-inline-start: -1px;
}

:host([dropdown-disabled][variant="secondary"]) .dropdown-button {
  inset-inline-start: 0;
}

:host([dropdown-disabled][variant="secondary"][dir="rtl"]) .dropdown-button {
  inset-inline-end: 0;
}

.split-divider {
  display: block;
  height: var(--bl-size-2xl);
  width: 1px;
  background-color: var(--bl-color-neutral-full);
}

:host([variant="secondary"]) .split-divider {
  display: none;
}

:host([size="small"]) .split-divider {
  height: var(--bl-size-xl);
}

:host([size="large"]) .split-divider {
  height: var(--bl-size-3xl);
}

:host([dropdown-disabled][disabled]) .split-divider {
  display: block;
  background-color: var(--bl-color-neutral-lighter);
}
